package com.example.bourse.core.enums;

public enum ReqCodeEnum {
    SUCCESS(200, "成功"),
    ERROR(300, "失败"),
    INTERNAL_ERROR(500, "服务器内部错误"),
    CUSTOM_EXCEPTION(501, "自定义异常"),
    NOT_FOUND(404, "资源未找到"),
    BAD_REQUEST(400, "错误的请求"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    PATH_ERROR(404, "路径请求错误"),
    ERROR_ALL(9999, "错误");

    private final int code;
    private final String message;

    ReqCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
